home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / SDKs / Word Services SDK 1.0.6 / Writeswell Jr 1.2.1 Sources ƒ / Writeswell Jr. Source / WWJrAbout.c < prev   
Encoding:
C/C++ Source or Header  |  1995-09-11  |  1.5 KB  |  88 lines  |  [TEXT/MMCC]

  1. /* WWJrAbout.c
  2.  * Handle about box for Writeswell Jr.
  3.  * Copyright ©1993 Working Software, Inc.  All Rights Reserved.
  4.  * 1 Mar 93 Mike Crawford
  5.  */
  6.  
  7. #include "TBConstants.h"
  8. #include "TBGlobals.h"
  9. #include "WWJrAbout.h"
  10. #include "AboutVersion.h"
  11.  
  12. void DoAboutMe( void )
  13. {
  14.     DialogPtr    dlg;
  15.     short        item;
  16.     short        curFile;
  17.     
  18.     dlg = GetNewDialog( kAboutMeID, (Ptr)NULL, (WindowPtr) -1 );
  19.  
  20.     if ( !dlg )
  21.         return;
  22.     
  23.     curFile = CurResFile();
  24.     UseResFile( gAppFileRefNum );
  25.  
  26.     /* 1.0.2 display the version number from the 'vers' resource -
  27.      * Install a "user item" to draw it in a custom font
  28.      */
  29.  
  30.     InstallAboutVersionProc( dlg, kAVersItem );
  31.  
  32.     do {
  33.         ModalDialog( (ModalFilterUPP)NULL, &item );
  34.     } while ( item != 1 );
  35.     
  36.     DestroyAboutVersionProc( dlg, kAVersItem );
  37.  
  38.     DisposDialog( dlg );
  39.     
  40.     UseResFile( curFile );
  41.  
  42.     return;
  43. }
  44.  
  45. #ifdef NEVER
  46. pascal void AboutVersionProc( DialogPtr dlg, short item )
  47. {
  48.     Handle        h;
  49.     short        kind;
  50.     Rect        r;
  51.     GrafPtr        oldPort;
  52.     VersRecHndl    versH;
  53.     
  54.     /* Draw the version number by getting it from the vers
  55.      * resource.  Saves a lot of time when making a new master disk
  56.      */
  57.          
  58.     versH = (VersRecHndl)GetResource( 'vers', rVersID );
  59.  
  60.     if ( !versH ){
  61.         return;
  62.     }
  63.     
  64.     GetPort( &oldPort );
  65.     SetPort( dlg );
  66.     
  67.     GetDItem( dlg, item, &kind, &h, &r );
  68.     
  69.     MoveTo( r.left, r.bottom );
  70.     
  71.     HLock( versH );
  72.     
  73.     PenNormal();
  74.     TextFont( applFont );
  75.     TextSize( 10 );
  76.     TextFace( 0 );
  77.  
  78.     DrawString( (*versH)->shortVersion );
  79.     
  80.     HUnlock( versH );
  81.     ReleaseResource( versH );
  82.     
  83.     SetPort( oldPort );
  84.  
  85.     return;
  86. }
  87. #endif
  88.